package com.wlk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wlk.pojo.User;
import com.wlk.pojo.dto.UserDTO;
import com.wlk.pojo.dto.UserGrantDTO;
import com.wlk.pojo.dto.UserSelDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    UserDTO getUserWithRolesByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
    Integer insertUser(User user);
    Integer getUserIdByUsername(@Param("username") String username);

    List<UserSelDTO> getListToAddDep();

    List<UserGrantDTO> getListToGrant(@Param("proCode") String proCode);
}
